﻿@using MobileStore.Bussiness.Models;
@{
    ViewBag.Title = "Siêu thị điện thoại Luwx - Keep it simple stupid";
    Layout = "~/Views/Shared/_Layout.cshtml";
    
    List<Category> ListCats = ViewData["Categories"] as List<Category>;
}
    <!--Banner Starts-->
    @{Html.RenderAction("_PartialBanner", "Home");}
    <!--Banner Ends-->

<!--Product List Starts-->
<div class="products_list products_slider">
    <h2 class="sub_title">Sản phẩm mới</h2>
    @{Html.RenderAction("_PartialListNewProduct", "Home", null);}
</div>
<!--Product List Ends-->

<!--Product List Starts-->
<div class="products_list products_slider">
    <h2 class="sub_title">Sản phẩm bán chạy</h2>
    @{Html.RenderAction("_PartialListTopSales", "Home", null);}
</div>
<!--Product List Ends-->
            
<!--Product List Starts-->
<div id="list-brand">
</div>
@foreach (Category ct in ListCats)
{ 
        <script type="text/javascript">
            $(document).ready(function(){
                $.ajax({
                    type:'POST',
                    url: '@Url.Action("_PartialBrandFilter","Home")',
                    async:true,
                    data:{ID:'@ct.CategoryID'},
                    success:function(res){
                        $("#list-brand").append(res);
                    }
                });
            });
        </script>
}
<!--Product List Ends-->